package com.zxp.zxpsmarthomeapk.view.activity;

import android.os.Bundle;
import android.support.v7.widget.RecyclerView;
import android.view.View;
import android.widget.TextView;

import com.qmuiteam.qmui.widget.QMUITopBar;
import com.zxp.zxpsmarthomeapk.R;
import com.zxp.zxpsmarthomeapk.base.CommentActivity;
import com.zxp.zxpsmarthomeapk.customview.RoundProgress;

import butterknife.BindView;

public class RoomDeviceContentActivity extends CommentActivity {

    /**
     * 标题栏
     */
    @BindView(R.id.topbar_room_device_content)
    QMUITopBar topbar_room_device_content;

    /**
     * 当前室温
     */
    @BindView(R.id.tv_temperature_indoor)
    TextView tv_temperature_indoor;

    /**
     * 温度圆形显示进度条
     */
    @BindView(R.id.rpFreqProgress)
    RoundProgress rpFreqProgress;

    /**
     * 房间内设备显示详情
     */
    @BindView(R.id.rv_room_device_content)
    RecyclerView rv_room_device_content;

    @Override
    protected int getLayoutResourceId() {
        return R.layout.activity_room_device_content;
    }

    @Override
    protected void initData() {
        Bundle bundle = getIntent().getExtras();
        topbar_room_device_content.setTitle(bundle.getString("msg"));
    }

    @Override
    protected void initView() {
        topbar_room_device_content.addLeftBackImageButton().setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                finish();
            }
        });
        topbar_room_device_content.addRightImageButton(R.drawable.ic_settings_black_24dp, R.id.topbar_right_button).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                toast("显示设置界面");
            }
        });

        rpFreqProgress.setProgress(28.00f);
        tv_temperature_indoor.setText("28℃");
    }

}
